Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

note on AMD best practices #1478

Closed
wants to merge 2 commits into from
Closed

note on AMD best practices #1478

wants to merge 2 commits into from

Conversation

sheppard
Copy link
Contributor

@sheppard sheppard commented Jan 9, 2014

Not surprisingly, jQuery has become the go-to example for developers looking to add an AMD definition to their library. As we know, jQuery's near ubiquity means that certain AMD recommendations are not practical for jQuery. Unfortunately, the jQuery named module registration is referenced with the (reasonable) assumption that it's representative of AMD best practices. For example discussions, see Leaflet/Leaflet#1364. Leaflet/Leaflet#1778, janl/mustache.js#333, janl/mustache.js#345 and d3/d3#1672.

I'm hoping an extra comment will make it clear that jQuery is a special case.

@dmethvin
Copy link
Member

@sheppard It would be ideal if we could reference some quasi-authoritative document rather than just put the comment here. Where would be the best place to point people?

@sheppard
Copy link
Contributor Author

The best reference is probably
https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries

Though we could also link to the docs for define():
http://requirejs.org/docs/api.html#define

@sheppard
Copy link
Contributor Author

Bug tracker ticket: http://bugs.jquery.com/ticket/14687

@dmethvin dmethvin closed this in 2585ee5 Mar 13, 2014
dmethvin pushed a commit that referenced this pull request Mar 13, 2014
Fixes #14687
Closes gh-1478
(cherry picked from commit 19220c0f29fa60d80a2beb76f048ffc8b972ba35)

Conflicts:
	AUTHORS.txt
@sheppard sheppard deleted the patch-1 branch March 14, 2014 15:20
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
Fixes #14687
Closes jquerygh-1478
(cherry picked from commit 19220c0f29fa60d80a2beb76f048ffc8b972ba35)

Conflicts:
	AUTHORS.txt
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants